<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title></title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.7 -->
    <link rel="stylesheet" th:href="@{/adminlte/bower_components/bootstrap/dist/css/bootstrap.min.css}"/>
    <!-- Font Awesome -->
    <link rel="stylesheet" th:href="@{/adminlte/bower_components/font-awesome/css/font-awesome.min.css}"/>
    <!-- Ionicons -->
    <link rel="stylesheet" th:href="@{/adminlte/bower_components/Ionicons/css/ionicons.min.css}">
    <!-- Theme style -->
    <link rel="stylesheet" th:href="@{/adminlte/dist/css/AdminLTE.min.css}">
    <!-- AdminLTE Skins. Choose a skin from the css/skins
         folder instead of downloading all of them to reduce the load. -->
    <link rel="stylesheet" th:href="@{/adminlte/dist/css/skins/_all-skins.min.css}">



</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">



    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                门牌申请
                <small>Preview</small>
            </h1>
            <ol class="breadcrumb">
               
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="row">
                <!-- left column -->
                <div class="col-md-6">
                    <!-- general form elements -->
                    <div class="box box-primary">
                        <div class="box-header with-border">
                            <h3 class="box-title" >请填写以下信息</h3>
                            <h3 class="box-title" style="color: red" th:text="${msgs}"></h3>
                        </div>
                        <!-- /.box-header -->
                        <!-- form start -->
                        <form role="form" th:action="@{/applications/add}" method="post" th:object="${applications}">
                            <div class="box-body">
<!--                                <div class="form-group">-->
<!--                                    <label for="doorId2">doorid</label>-->
<!--                                    <input type="text" name="doorId2" id="doorId2" class="form-control"-->
<!--                                           th:field="*{doorId2}">-->
<!--                                </div>-->

                                <div class="form-group">
                                    <label for="userId">申请人ID：</label>
                                    <input type="hidden" class="form-control" name="applicationId" th:field="*{applicationId}" >
                                    <input type="text" id="userId" class="form-control" name="userId"placeholder="身份证："
                                           th:field="*{userId}">

                                </div>
                                <div class="form-group">
                                    <label for="applicationThings">申请位置：</label>
                                    <input type="text" name="applicationThings" id="applicationThings" class="form-control"placeholder="位置："
                                           th:field="*{applicationThings}">
                                    <input type="hidden"class="form-control" name="applicationbsck" id="applicationbsck" value="待审核"  >
                                </div>


                                <!--                <div class="form-group">-->
                                <!--                  <label for="exampleInputFile">File input</label>-->
                                <!--                  <input type="file" id="exampleInputFile">-->

                                <!--                  <p class="help-block">Example block-level help text here.</p>-->
                                <!--                </div>-->
                                <!--                <div class="checkbox">-->
                                <!--                  <label>-->
                                <!--                    <input type="checkbox"> Check me out-->
                                <!--                  </label>-->
                                <!--                </div>-->
                            </div>
                            <!-- /.box-body -->

                            <div class="box-footer">
                                <button type="submit" class="btn btn-primary"  onclick="checkform()">提交</button>
                                <a th:href="@{/page/user_page.html}">
                                    <input type="button"  class="btn btn-info" style="margin-left: 30px" th:value="取消" >
                                </a>
                            </div>
                        </form>
                    </div>
                    <!-- /.box -->


                </div>
                <!--/.col (left) -->
                <!-- right column -->

                <!--/.col (right) -->
            </div>
            <!-- /.row -->
        </section>
        <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->


    <!-- Control Sidebar -->

    <div class="control-sidebar-bg"></div>
</div>
<!-- ./wrapper -->

<!-- jQuery 3 -->
<script th:src="@{/adminlte/bower_components/jquery/dist/jquery.min.js}"></script>
<!-- Bootstrap 3.3.7 -->
<script th:src="@{/adminlte/bower_components/bootstrap/dist/js/bootstrap.min.js}"></script>
<!-- FastClick -->
<script th:src="@{/adminlte/bower_components/fastclick/lib/fastclick.js}"></script>
<!-- AdminLTE App -->
<script th:src="@{/adminlte/dist/js/adminlte.min.js}"></script>
<!-- AdminLTE for demo purposes -->
<script th:src="@{/adminlte/js/demo.js}"></script>
<script>
    function checkform(){
        if(document.getElementById('userId').value.length==0){
            alert('身份证不能为空！');
            document.getElementById('userId').focus();
            window.location.href= "application_add";
        }
        if(document.getElementById('applicationThings').value.length==0){
            alert('地址信息不能为空！');
            document.getElementById('applicationThings').focus();
            window.location.href= "application_add";
        }
    }
</script>
</body>
</html>
